<?
abstract class ApplicationController extends BiruControllerBase
{
	function admin_login_required()
	{
		if( $this->sessionA->loggedin && (int)$this->sessionA->usertype == 2 )
		{
			return true;
		}
		$this->flash->warning = 'Please login to continue';
		$this->sessionA->return_to = $this->request->query_string;
		return $this->redirect( 'login', 'index' );
	}
	
	function student_login_required()
	{
		if ( $this->sessionA->loggedin && $this->sessionA->usertype == 1 )
		{
			return true;
		}
		$this->flash->warning = 'Please login to continue';
		$this->sessionA->return_to = $this->request->query_string;
		return $this->redirect( 'login', 'index' );
	}
}
?>
